{extend name="base" /}
{block name="content"}
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>系统</span>
            <span class="icon-angle-right"></span>
            <span>会员管理</span>
            <span class="icon-angle-right"></span>
            <span>{$info ? '编辑' : '添加'}会员角色</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <div class="m-form">
                <form class="layui-form" id="j_form">
                    <table class="m-table">
                        <thead>
                            <tr>
                                <th colspan="2">{$info ? '编辑' : '添加'}会员角色</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td width="15%"><label for="name">角色名称<em>*</em></label></td>
                                <td><input type="text" class="u-ipt u-ipt-long" name="name" id="name" placeholder="请输入会员角色名称" value="{$info.name}" /></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="name">所需积分<em>*</em></label></td>
                                <td><input type="text" class="u-ipt u-ipt-long" name="demand_integral" id="demand_integral" placeholder="请输入所需积分" value="{$info.demand_integral}" /></td>
                            </tr>
                            <tr>
                                <td><label for="">图标<em>*</em></label></td>
                                <td>
                                    <button type="button" class="layui-btn u-upload-pic" data-name="icon"><i class="layui-icon">&#xe67c;</i>上传图片</button>
                                    <div class="m-pic">
                                        <ul>
                                            {:attach_html($info.icon, 'icon')}
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <div class="m-form-btn"><input type="hidden" name="id" value="{$info.id}"><button id="j_btn" class="u-btn">确定提交</button></div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="extrajs"}
{include file="public:upload"/}
{/block}